package com.tomehay.termprojectmanage_server.service;

import com.tomehay.termprojectmanage_server.pojo.Model.GroupTask;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tomehay.termprojectmanage_server.pojo.VO.GroupTaskVO;
import com.tomehay.termprojectmanage_server.pojo.VO.ResultVO;
import io.swagger.models.auth.In;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author tomehay
 * @since 2023-06-20
 */
public interface GroupTaskService extends IService<GroupTask> {


    List<GroupTask> queryPage(Integer groupID, Integer termProjectId);

    ResultVO<List<GroupTaskVO>> FindUnEndedGroupTask(int courseId);

    ResultVO<List<GroupTaskVO>> FindEndedGroupTask(int courseId);

    ResultVO<Void> CreateTask(GroupTask groupTask);

    ResultVO<Void> EndGroupTask(int id);

    ResultVO<GroupTask> GetOne(int id);

    ResultVO<Void> RejectTask(int id);

    ResultVO<List<GroupTaskVO>> FindUnEndedGroupTaskByTermProjectId(int termProjectId);

    ResultVO<List<GroupTaskVO>> FindEndedGroupTaskByTermProjectId(int termProjectId);

    ResultVO<Void> UpLoadCode(MultipartFile multipartFile, int id) throws IOException;

    ResultVO<Void> UpLoadDoc(MultipartFile multipartFile, int id) throws IOException;

    void exportFile(String path, HttpServletResponse response) throws IOException;

    ResultVO<Void> FinishGroupTask(int id);

    ResultVO<Void> DeleteCode(int id, String path);

    ResultVO<Void> DeleteDoc(int id, String path);
}
